package org.example.factory.abstractFactory;

import org.example.factory.service.Action;
import org.example.factory.service.impl.JumpAction;
import org.example.factory.service.impl.RunAction;
import org.example.factory.service.impl.SingAction;

public class SingerActionFactory implements AbstractActionFactory{
    @Override
    public Action createJumpAction() {
        return new JumpAction() {
            @Override
            public void doAction() {
                System.out.println("歌手在舞台上跳跃");
            }
        };
    }

    @Override
    public Action createRunAction() {
        return new RunAction() {
            @Override
            public void doAction() {
                System.out.println("歌手在演唱会舞台上奔跑");
            }
        };
    }

    @Override
    public Action createSingAction() {
        return new SingAction() {
            @Override
            public void doAction() {
                System.out.println("歌手专业演唱");
            }
        };
    }
}
